# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=oq
pkgver=1.3.2
pkgrel=0
pkgdesc="portable jq wrapper with support of other formats than JSON"
url="https://github.com/blacksmoke16/oq"
arch="x86_64 aarch64"  # limited by Crystal
license="MIT"
depends="jq"
makedepends="crystal libxml2-dev yaml-dev"
source="https://github.com/Blacksmoke16/oq/archive/v$pkgver/$pkgname-$pkgver.tar.gz"

build() {
	mkdir -p bin
	crystal build --release -o bin/oq src/oq_cli.cr
}

check() {
	crystal spec
}

package() {
	install -D -m 755 bin/oq "$pkgdir"/usr/bin/oq
}

sha512sums="
f7869cc4d0008765d14b4b074eea2e36e62c1b79bfb5562e7bb001892f9db0554a960cec776fcfb34bbdee36d5a4d66ad50db299f147ebb45c6d0e5f9efe8d16  oq-1.3.2.tar.gz
"
